<template>
	<view class="page">
		<view class="df_aravat">
			<image src="/static/image/df_aravat.png" mode="widthFix" class="img"></image>
		</view>
		<view class="btn" @click="goLogin">
			微信授权一键登录
		</view>
		<view class="tips">
			登录代表同意<text class="link">《用户协议》</text>和<text class="link">《隐私协议》</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// 学校id
				id: '',
			}
		},
		onLoad(opt) {
			if (opt.id) {
				this.id = opt.id
			}
		},
		methods: {
			goLogin() {
				if (!uni.getStorageSync('token')) {
					window.location.href =
						`https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxddc10ac093d2af63&redirect_uri=${encodeURIComponent('https://xybl.appldkj.com/#/pages/index/index')}&response_type=code&scope=snsapi_userinfo&state=#wechat_redirect`
				}
			},
		}
	}
</script>

<style scoped lang="scss">
	.page {

		.df_aravat {
			width: 181.34rpx;
			margin: 180rpx auto 0;

			.img {
				width: 100%;
			}
		}

		.btn {
			width: 533rpx;
			height: 89rpx;
			background: #07C160;
			box-shadow: 0rpx 18rpx 36rpx 0rpx rgba(229, 229, 229, 0.5);
			border-radius: 178rpx 178rpx 178rpx 178rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: 500;
			font-size: 30rpx;
			color: #FFFFFF;
			line-height: 89rpx;
			text-align: center;
			margin: 98rpx auto 0;
		}

		.tips {
			font-family: PingFang SC, PingFang SC;
			font-weight: 400;
			font-size: 21rpx;
			color: #888888;
			margin: 20rpx auto 0;
			text-align: center;

			.link {
				color: #42A4FF;
			}
		}
	}
</style>